2b7161c
@@ -104,7 +104,7 @@
public class ThreadsDefinition extends OutputDefinition<ThreadsDefinition> imple
         } else {
             thread.setCallerRunsWhenRejected(getCallerRunsWhenRejected());
         }
-        thread.setRejectedPolicy(getRejectedPolicy());
+        thread.setRejectedPolicy(resolveRejectedPolicy(routeContext));
 
         List<Processor> pipe = new ArrayList<Processor>(2);
         pipe.add(thread);
@@ -119,6 +119,16 @@
public class ThreadsDefinition extends OutputDefinition<ThreadsDefinition> imple
         };
     }
 
+    protected ThreadPoolRejectedPolicy resolveRejectedPolicy(RouteContext routeContext) {
+        if (getExecutorServiceRef() != null && getRejectedPolicy() == null) {
+            ThreadPoolProfile threadPoolProfile = routeContext.getCamelContext().getExecutorServiceManager().getThreadPoolProfile(getExecutorServiceRef());
+            if (threadPoolProfile != null) {
+                return threadPoolProfile.getRejectedPolicy();
+            }
+        }
+        return getRejectedPolicy();
+    }
+
     @Override
     public String getLabel() {
         return "threads";
